<div ng-controller="ordersCtrl">
    <table class="table table-striped table-bordered">
        <tr><th>Name</th><th>City</th><th>Value</th><th></th></tr>
        <tr ng-repeat="order in orders">
            <td>{{order.name}}</td>
            <td>{{order.city}}</td>
            <td>{{calcTotal(order) | currency}}</td>
            <td>
                <button ng-click="selectOrder(order)" class="btn btn-xs btn-primary">
                    Details
                </button>
            </td>
        </tr>
    </table>
000
    <div ng-show="selectedOrder">
        <h3>Order Details</h3>

        <table class="table table-striped table-bordered">
            <tr><th>Name</th><th>Count</th><th>Price</th></tr>
            <tr ng-repeat="item in selectedOrder.products">
                <td>{{item.name}}</td>
                <td>{{item.count}}</td>
                <td>{{item.price| currency}} </td>
            </tr>
        </table>
    </div>
</div>
